/**
 * @author liangxi
 * @since 2023/12/21
 */

#include "DinerMenuIterator.h"

namespace Iterator::Transition {
    bool DinerMenuIterator::hasNext() {
        if (position >= items.size() || items.at(position) == nullptr) {
            return false;
        }
        return true;
    }

    std::shared_ptr<MenuItem> DinerMenuIterator::next() {
        auto item = items.at(position);
        ++position;
        return item;
    }
} // Transition